
<div class="indexWidth" >
<button type="button" class="btn btn-info mainButtonRight"><a href="javascript:takeout.openMenu('${ctxPath!}/video/list?categoryid=${categoryid!}', null)" class="mianAcolor">返回</a></button>

<div class="sectionTitle">
    视频管理
    <hr>
</div>
</div>
<form id="videoForm" name="form1" action="${ctxPath!}/video/save?categoryid=${categoryid!}" method="POST" class="form-horizontal" enctype="multipart/form-data">
    <input type="hidden" name="video.id" value="${video.id!}" />
    <input type="hidden" id="img_ids" name="img_ids"/>
    <div id="tab" class="btn-group" data-toggle="buttons-radio" style="margin-left: 100px">
        <a href="#htmlimage" class="btn btn-large btn-info  active" data-toggle="tab">填写网址</a>
        <a href="#fileimage" class="btn btn-large btn-info" data-toggle="tab">选择文件</a>
    </div>
    <div class="tab-content" style="margin-top: 10px">

        <div class="tab-pane active" id="htmlimage">
            <div class="articleFormLabel"  style="display: flex;align-items:center;" >
                <label class="mainSetConsistentWidth">封面图片：</label>
                <input type="text" name="video.cover" target="_blank"   style="margin-top: 4px" class="mainSetWidth" value="${video.cover!}" placeholder="" />
            </div>
        </div>
        <div class="tab-pane " id="fileimage">
            <div class="articleFormLabel"   style="display: flex;align-items:center;">
                <label class="mainSetConsistentWidth">封面图片：</label>
                <input type="file" id="grouping" name="img" class="mainSetWidth" >
                <a href="${video.cover!}" target="_blank" style="margin-left: 10px;">查看图片(图片大小无限制)</a>
            </div>
        </div>
    </div>

    <div class="articleFormLabel">
        <label class="mainSetConsistentWidth">类别：</label>
        <#oneToManyTag val="${video.categoryid!}" type="select" table="category" columnName="name" class="mainSetWidth"
                pname="video.categoryid" defaultNumber="1" whereSel="parentid" whereArgs="1"></#oneToManyTag>
    </div>

    <div class="articleFormLabel">
        <label class="mainSetConsistentWidth">是否VIP：</label>
        <#dictTag val="${video.isvip!}" type="select" group="yes_no" pname="video.isvip" defaultNumber="2"></#dictTag>
    </div>

    <div class="articleFormLabel">
        <label class="mainSetConsistentWidth">标题：</label>
        <input type="text" name="video.title" class="mainSetWidth" value="${video.title!}" placeholder="" />
    </div>
    <div class="articleFormLabel">
        <label class="mainSetConsistentWidth">阅读量：</label>
        <input type="text" name="video.readtimes" class="mainSetWidth" value="${video.readtimes!}" />
    </div>
    <div class="articleFormLabel">
        <label class="mainSetConsistentWidth">点赞量：</label>
        <input type="text" name="video.favtimes" class="mainSetWidth" value="${video.favtimes!}" />
    </div>
    <div class="articleFormLabel">
        <label class="mainSetConsistentWidth">密码：</label>
        <input type="text" name="video.passwd" class="mainSetWidth" value="${video.passwd!}" placeholder="" />
    </div>
    <div class="articleFormLabel">
        <label class="mainSetConsistentWidth">视频地址：</label>
        <input type="text" name="video.url" class="mainSetWidth" value="${video.url!}" placeholder="" />
    </div>
    <div class="articleFormLabel">
        <label class="mainSetConsistentWidth">中断时间(秒)：</label>
        <input type="text" name="video.interrupttime" class="mainSetWidth" value="${video.interrupttime!}" placeholder="" onkeyup="nan(this)" onchange="nan(this)"/>
    </div>


    <!--
        <div class="articleFormLabel">
            <label class="mainSetConsistentWidth">详细介绍：</label>
            <!--<input type="text" name="video.content" class="mainSetWidth" value="${video.content!}" placeholder="" />
        <textarea name="video.content" id="news_content" style="width:800px;height:400px;">${video.content!}</textarea>
    </div>-->
    <div class="articleFormLabel">
        <label class="mainSetConsistentWidth">APPID：</label>
        <input type="text" name="video.wxappid" class="mainSetWidth" value="${video.wxappid!}" placeholder="" />
    </div>
    <div class="articleFormLabel">
        <label class="mainSetConsistentWidth">APPURL：</label>
        <input type="text" name="video.wxppurl" class="mainSetWidth" value="${video.wxppurl!}" placeholder="" />
    </div>
    <div class="form-group">
        <button style="margin-left: 100px;width:95px;" class="btn btn-info articleFormButton" type="button"
                onclick="takeout.ajaxFormMainPanel('videoForm')" >保存</button>
    </div>

</form>

<script>function nan(t){
    t.value=t.value.replace(/[^\d]/g,"");
}
</script>